Skip to content

Enable theme translation#246

Merged
hugovk merged 10 commits into
python:mainfrom
StanFromIreland:localize-theme
Sep 7, 2025
Merged

Enable theme translation#246
hugovk merged 10 commits into
python:mainfrom
StanFromIreland:localize-theme

Conversation

@StanFromIreland

@StanFromIreland StanFromIreland commented Aug 7, 2025

Copy link
Copy Markdown
Member

Adds Polish to start. Based on @rffontenelle 's pr. This does not allow for translation of the Copy button for some reason, but I think that can be left for another time.

Result:

image

📚 Documentation preview 📚: https://python-docs-theme-previews--246.org.readthedocs.build/

🇵🇱 Polish preview 🇵🇱

@StanFromIreland StanFromIreland marked this pull request as ready for review August 7, 2025 15:12
@StanFromIreland StanFromIreland marked this pull request as draft August 7, 2025 15:13
@StanFromIreland StanFromIreland marked this pull request as ready for review August 7, 2025 17:19
@StanFromIreland StanFromIreland changed the title Localize theme Enable theme translation Aug 7, 2025
@rffontenelle rffontenelle mentioned this pull request Aug 7, 2025
@rffontenelle

Copy link
Copy Markdown
Contributor

Thanks for fixing what was missing with the solution!

@m-aciek m-aciek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translation improvement suggestions, otherwise looks good to me 👍

Comment thread python_docs_theme/locales/pl_PL/LC_MESSAGES/messages.po Outdated
Comment thread python_docs_theme/locales/pl_PL/LC_MESSAGES/messages.po Outdated
Comment thread python_docs_theme/locales/pl_PL/LC_MESSAGES/messages.po Outdated
Comment thread python_docs_theme/locales/pl_PL/LC_MESSAGES/messages.po Outdated
Comment thread python_docs_theme/locales/pl_PL/LC_MESSAGES/messages.po Outdated

@m-aciek m-aciek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion for better portability

Comment thread python_docs_theme/__init__.py Outdated
Co-authored-by: Maciej Olko <maciej.olko@gmail.com>
yeager added a commit to yeager/python-docs-theme that referenced this pull request Aug 29, 2025
@StanFromIreland StanFromIreland requested a review from hugovk August 29, 2025 15:06

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks about right, but I'd appreciate a PR approval from a translator as well.

And we can always iterate and fix as needed after an initial release.

Comment thread babel_runner.py Outdated
Comment thread babel_runner.py
Comment thread python_docs_theme/__init__.py Outdated
Comment thread python_docs_theme/locales/pl_PL/LC_MESSAGES/messages.mo Outdated
@StanFromIreland

Copy link
Copy Markdown
Member Author

Looks about right, but I'd appreciate a PR approval from a translator as well.

Maciek has already reviewed translation, see above.

Comment thread python_docs_theme/locales/pl_PL/LC_MESSAGES/messages.po
@hugovk

hugovk commented Sep 2, 2025

Copy link
Copy Markdown
Member

Looks about right, but I'd appreciate a PR approval from a translator as well.

Maciek has already reviewed translation, see above.

Yes, but not approved.

@StanFromIreland

Copy link
Copy Markdown
Member Author

In hopes of getting this in faster, I can just delete it?

Fun fact, translations of the Python docs are actually not reviewed for most languages.

@StanFromIreland

Copy link
Copy Markdown
Member Author

Preview! (built with -D language='pl')

@m-aciek m-aciek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks

Comment thread .gitignore
Comment thread babel_runner.py
Comment thread .gitignore
Comment thread python_docs_theme/locales/pl_PL/LC_MESSAGES/messages.mo Outdated
@StanFromIreland

Copy link
Copy Markdown
Member Author

It is no longer a follow up, it is now included in this PR!

Verified manually that the artefact has the compiled files.

@rffontenelle

Copy link
Copy Markdown
Contributor

Sweet! Was setup-python really necessary, considering that python is already included in the GH runner image?

@StanFromIreland

Copy link
Copy Markdown
Member Author

It is used in all other workflows in this repository when Python is needed.

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hugovk hugovk merged commit 4f43ade into python:main Sep 7, 2025
12 checks passed
@StanFromIreland StanFromIreland deleted the localize-theme branch September 7, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants